import {
	createRouter,
	createWebHashHistory
} from 'vue-router'
// import login from '../views/login/login.vue'
import Layout from '../layout'

const routes = [
	{
		path: '/login',
		component: () => import('../views/login/login.vue'),
		hidden: true
	},
	{
		path: '/',
		name: 'home',
		component: Layout,
		children: [{
			path: '/',
			name: '首页',
			component: () => import('@/views/index/index.vue')
		}]
	},
	{
		path: '/about',
		name: 'About',
		component: Layout,
		children: [{
			path: '/about',
			name: '关于',
			component: () => import('@/views/About.vue')
		}]
	}
]

const router = createRouter({
	history: createWebHashHistory(),
	routes
})

export default router
